package com.lechuang.member.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lechuang.common.model.BaseEntity;
import com.lechuang.member.entity.MemberLevel;
import com.lechuang.member.service.MemberLevelService;
import com.lechuang.member.mapper.MemberLevelMapper;
import org.springframework.stereotype.Service;

/**
* @author apple
* @description 针对表【member_level(会员等级表)】的数据库操作Service实现
* @createDate 2024-06-22 14:08:36
*/
@Service
public class MemberLevelServiceImpl extends ServiceImpl<MemberLevelMapper, MemberLevel>
    implements MemberLevelService{

    @Override
    public MemberLevel queryDefalut() {
        MemberLevel memberLevel = this.lambdaQuery()
                .eq(MemberLevel::getDefaultFlag, MemberLevel.DEFAULT_FLAG)
                .eq(MemberLevel::getStatus,BaseEntity.STATUS_NORMAL)
                .one();
        return memberLevel;
    }
}




